Ext.define("wmf.view.ec.edit", {
    extend: "wmf.lib.FormPanel",
    alias: "widget.ecEdit",
	anchor: '100% 100%',
    border: false,
    autoScroll: true,
    fieldDefaults: {
        labelWidth: 90
    },
    items: [{
        name: "ecName", 
        xtype: "textfield",
        allowBlank: false,
        vtype: 'propertyType',
        fieldLabel: "企业名称"
    },{
    	xtype: "textfield",
        name: "id", 
        allowBlank: false,
        editable: false,
        readOnly: true,
        vtype: 'propertyType',
        fieldLabel: "企业ID"
    },{
    	xtype: 'combo',
		emptyText:  '请选择...',
		hiddenName: 'province',
		autoSelect: true,
		allowBlank: false,
		displayField: 'name',
		queryMode: 'local',
		valueField: 'province',
		triggerAction: 'all',
		editable: false,
		store: 'ec.province',
        name: "province", 
        fieldLabel: "所属省份"
    },{
        xtype: "textfield",
        name: "industryType", 
        vtype: 'propertyId',
        fieldLabel: "行业类别"
    },{
    	xtype: "datefield",
        format:'Ym',
        maxLength:50,
        vtype: 'timerange',
        editable : false,
        endTimeField: 'constractEndMonth',
	    emptyText:'请选择开始时间',
        name: "constractBeginMonth", 
        allowBlank: false,
        fieldLabel: "合同起始时间"
    },{
    	xtype: "datefield",
        format:'Ym',
        maxLength:50,
        vtype: 'timerange',
        editable : false,
        startTimeField: 'constractBeginMonth',
 	    emptyText:'请选择截止时间',
        name: "constractEndMonth", 
        allowBlank: false,
        fieldLabel: "合同终止时间"
    },{
    	xtype: 'combo',
		emptyText:  '请选择...',
		hiddenName: 'paymentType',
		autoSelect: true,
		displayField: 'name',
		queryMode: 'local',
		valueField: 'paymentType',
		triggerAction: 'all',
		allowBlank: false,
		editable: false,
		store: 'ec.paymentType',
        name: "paymentType", 
        fieldLabel: "付费方式"
    },{
        xtype: "textfield",
        name: "address", 
        vtype: 'propertyName',
        fieldLabel: "企业地址"
    },{
        xtype: "textfield",
        name: "contactor", 
        vtype: 'propertyType',
        fieldLabel: "联系人"
    },{
        xtype: "textfield",
        name: "phone", 
        vtype: 'propertyType',
        fieldLabel: "电话"
    },{
        xtype: "textfield",
        name: "email", 
        vtype: 'propertyType',
        fieldLabel: "邮箱"
    }],
    
	dockedItems: [{
		xtype: 'toolbar',
		dock: 'bottom',
		layout: {
				type: 'hbox',
				alian: 'center',
				flex: 1
		},
		
		defaults: {
			xtype: 'button'
		},
		items: [{
			xtype : 'tbfill'
		},{
			itemId: 'save',
			icon: 'resources/icons/pencil.png',
			formBind: true,
			text: translations.global.operation.edit
		},{
			itemId: 'reset',
			icon: 'resources/icons/icon_recover.png',
			text: translations.global.operation.reset
		},{
			itemId: 'cancel',
			icon : 'resources/icons/icon_revoke.png',
			text: translations.global.operation.cancel
		}]
	}]
});